package com.iss.yunpan.service.impl;

import com.iss.yunpan.dao.ShareDao;
import com.iss.yunpan.entity.ShareContent;
import com.iss.yunpan.service.ShareService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShareServiceImpl implements ShareService {
    @Autowired
    private ShareDao dao;

    @Override
    public void deleteShare(String shareName, Integer id) {
        ShareContent con = new ShareContent();
        con.setShareName(shareName);
        con.setId(id);
        dao.deleteShare(con);
    }

    @Override
    public List<ShareContent> getShareFile(String shareName) {
        return dao.getShareFile(shareName);
    }
}
